<?php

/**
 * @author Martin Pernica
 * @copyright 2008
 */


$modules = array();
$query = $db->query("SELECT * FROM {prefix}rightblock WHERE active = '1' ORDER BY weigh");
$i = 0;
while($data = $query->fetch_object()){
	switch($data->type){
		case('text'):
		$modules[$i] = $data->text;
		break;
		case('module'):
		$modules[$i] = $data->module_path;
		break;
	}
	$i++;
}

foreach($modules as $key){
 if(is_file($key)){
    echo "\n";
	require($key);
 }
 else{
    echo "\n";
	echo $key;
 }
}

?>